import React from 'react'
import style from '../../liebiao/index.module.css'
import { useNavigate } from 'react-router-dom';
function Item(props) {
    const nav=useNavigate()
    console.log(props)
  return (
    <div>
      <div className={style.op} onClick={() => nav(`/xiangqing/${props.id}`)}>
        <span>
          <img
            src={props.coverImageUrl}
            alt=""
            style={{ width: "200px", height: "280px" }}
          />
        </span>
        <span className={style.op1}>{props.category}</span>
        <span></span>

        <span></span>
        <span>{props.location}</span>
        <span style={{ color: "red" }}>{props.price}</span>

        <span></span>
        <span>$:{props.name}</span>
        <span></span>
      </div>
    </div>
  );
}

export default Item
